package com.tomorrowbbs.domain;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 评论对象 forum_comment
 * 
 * @author zjz
 * @date 2024-11-09
 */
@Data
public class ForumComment
{
    private static final long serialVersionUID = 1L;

    /** 评论ID */
    private Long commentId;

    /** 父级评论ID */
    private Long pCommentId;

    /** 文章ID */
    private String articleId;

    /** 回复内容 */
    private String content;

    /** 图片 */
    private String imgPath;

    /** 用户ID */
    private String userId;

    /** 昵称 */
    private String nickName;

    /** 用户ip地址 */
    private String userIpAddress;

    /** 回复人ID */
    private String replyUserId;

    /** 回复人昵称 */
    private String replyNickName;

    /** 0:未置顶  1:置顶 */
    private Integer topType;

    /** 发布时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date postTime;

    /** good数量 */
    private Long goodCount;

    /** 0:待审核  1:已审核 */
    private Integer status;

    /*点赞类型 0:未点赞，1:已点赞*/
    private Integer likeType;

    /** 是否加载子评论 */
    private String orderBy;
    private Integer pageNo;
    private Integer pageSize;

    private Boolean loadChildren;
    private String currentUserId;
    private Boolean queryLikeType;
    private List<Long> pcommentIdList;
    private List<ForumComment> children;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("commentId", getCommentId())
            .append("pCommentId", getPCommentId())
            .append("articleId", getArticleId())
            .append("content", getContent())
            .append("imgPath", getImgPath())
            .append("userId", getUserId())
            .append("nickName", getNickName())
            .append("userIpAddress", getUserIpAddress())
            .append("replyUserId", getReplyUserId())
            .append("replyNickName", getReplyNickName())
            .append("topType", getTopType())
            .append("postTime", getPostTime())
            .append("goodCount", getGoodCount())
            .append("status", getStatus())
            .toString();
    }
}
